package model.trajectory;

import java.util.ArrayList;
import model.RoomModel;
import model.path.Point4D;

import utils.TimeIntervalle;

public class RoomTrajectoryModel extends BaseTrajectoryModel
{
	public RoomModel room;
	
	public RoomTrajectoryModel(TrajectoryModel parent, TimeIntervalle intervalle, ArrayList<Point4D> positions, RoomModel room)
	{
		super(parent, intervalle);
		this.positions = positions;
		this.room = room;
	}

	@Override
	public String toString()
	{
		String result = "Room:"+room.getID(); // + " : " + this.positions.toString();
		return result;
	}
	@Override
	public String toSaveText() 
	{
		String text = "";
		for(int i = 0; i < positions.size(); i++)
		{
			text += (intervalle.beginTime+i) + ";" + "room;" + room.getID() + ";;" + positions.get(i).x() + ";" + positions.get(i).y() + ";\n";
		}
		// TODO Auto-generated method stub
		return text;
	}
}
